﻿//  Copyright (c) 2010 Ray Liang (http://www.dotnetage.com)
//  Dual licensed under the MIT and GPL licenses:
//  http://www.opensource.org/licenses/mit-license.php
//  http://www.gnu.org/licenses/gpl.html
using System.Web.Routing;
using System.Web;
using System.Web.Mvc;
using DNA.Mvc.Security;

namespace DNA.Mvc.Publishing.Services
{
    public class WebblogRouteHandler : IRouteHandler
    {
        public IHttpHandler GetHttpHandler(RequestContext requestContext)
        {
            var membership = DependencyResolver.Current.GetService<IMembershipService>();
            var service = DependencyResolver.Current.GetService<IPubService>();

            return new WeblogService(membership, service);
        }
    }
}